﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.SimpleFlow
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.SimpleFlow;

    public class map_ApprovalMail : EntityMapping<ApprovalMail>
    {
        public map_ApprovalMail()
        {
            Property(x => x.Content, map =>
            {
                map.Length(100000);
            });

            Property(x => x.IsSend, map =>
            {
            });

            Property(x => x.UserID, map =>
            {
                map.Length(40);
            });

            Property(x => x.MailCC, map =>
            {
                map.Length(100000);
            });

            Property(x => x.MailTo, map =>
            {
                map.Length(100000);
            });

            Property(x => x.PlanDate, map =>
            {

            });

            Property(x => x.SendedDate, map =>
            {

            });

            Property(x => x.Title, map =>
            {
                map.Length(200);
            });
            
            //所属审批节点的待办
            ManyToOne(x => x.ThisToDo, map =>
            {
                map.Column("ToDoID");
            });
        }
    }
}
